<?
	/*
	 * @since 2012.03.27
	 * @author Charles Koh
	 * @returns {Register page 1}
	 */
?>
<html>
<head>
	<link rel="stylesheet" href="../../css/common.css"/>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script>
	function check_email()
	{
		window.open(
			"check_email.php?email=" + document.register_form.id.value,
			"IDcheck",
			"left=200,top=200,width=250,height=100,scrollbars=no,resizable=yes"
						);
	}

	function find_sponsor()
	{
		window.open(
			"find_sponsor.php?id=" + document.register_form.id.value,
			"IDcheck",
			"left=200,top=200,width=250,height=100,scrollbars=no,resizable=yes"
						);
	}
	
	var pageNo, step_pages = [];
	function show_step(step) {
		if (step_pages[pageNo]) {
			addClass(step_pages[pageNo], "displayNone");
			pageNo = step;
			removeClass(step_pages[pageNo], "displayNone");
		}
	}
	window.onload = function() {
		var step_pages_name = ["none","reg_step_1", "reg_step_2", "reg_step_3", "reg_step_4"];
		pageNo = 1;
		for (var i=0, len=step_pages_name.length; i<len; i++) {
			step_pages[step_pages.length] = document.getElementById(step_pages_name[i]) || 0;
		}
		show_step(pageNo);
	}
	function check_input()
	{
		if (!document.register_form.id.value)
		{
			alert("No input id");    
			document.register_form.id.focus();
			return;
		}

		if (!document.register_form.name.value)
		{
			alert("No input id");    
			document.register_form.name.focus();
			return;
		}

		if (!document.register_form.passwd.value)
		{
			alert("No input id");    
			document.register_form.passwd.focus();
			return;
		}
		
		if (!document.register_form.passwd_confirm.value)
		{
			alert("No input id");    
			document.register_form.passwd_confirm.focus();
			return;
		}
		
		if (document.register_form.passwd.value != 
			document.register_form.passwd_confirm.value)
		{
			alert("No input password");    
			document.register_form.passwd.focus();
			document.register_form.passwd.select();
			return;
		}
		
		document.register_form.submit();
	}

	function reset_form()
	{
		document.register_form.id.value = "";
		document.register_form.name.value = "";
		document.register_form.passwd.value = "";
		document.register_form.passwd_confirm.value = "";
		document.register_form.phone1.value = "";
		document.register_form.phone2.value = "";
		document.register_form.phone3.value = "";
		document.register_form.address.value = "";
		      
		document.register_form.id.focus();

		return;
	}
	

	</script>
</head>

<body>
	<!--Step 4-->
	<div id="reg_step_4">
		<table border=0 cellspacing=0 cellpadding=0 align=center width="682" >
			<tr><td>page 2</td></tr>
		</table>
	</div><!--Step 4-->
  </body>
</html>